package com.axonactive.yolo.webservice;

import java.io.IOException;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;

import com.axonactive.yolo.webservice.utils.Utils;

@Path("/flight")
public class Search {
	/**
	 * 
	 * @param searchParam in string jsonObject
	 * @return jsonObj 
	 * @throws IOException
	 * @throws InterruptedException
	 */

	@POST
	@Path("/search")
	@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
	@Produces(MediaType.APPLICATION_JSON)
	public String getProfile(MultivaluedMap<String, String> param)
			throws IOException, InterruptedException {
		return Utils.call("get_search/" + Utils.encode(param.getFirst("getSearchParam")));
	}

}
